# 导包
from common.base import *


class Index(Base):

    # index_url = 'http://172.16.140.91/ecshop/'
    index_url = 'http://192.168.0.193/ecshop/'

    # 定位请登录按钮
    def btn_index_login(self):
        self.click((By.PARTIAL_LINK_TEXT, '请登录'))

    # 定位请注册按钮
    def btn_index_register(self):
        self.click((By.LINK_TEXT, '免费注册'))

    # 定位用户名文本
    def username_text(self):
        return self.get_text((By.CLASS_NAME, 'f4_b'))

    # 定位退出按钮
    def btn_quit_login(self):
        self.click((By.LINK_TEXT, '退出'))

